Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test resources properties factory #667

Merged
merged 1 commit into from
Jul 19, 2024
Merged

Fix test resources properties factory #667

merged 1 commit into from
Jul 19, 2024

Conversation

melix
Copy link
Collaborator

@melix melix commented Jul 19, 2024

This commit fixes the TestResourcesPropertiesFactory, which incorrectly passed the testResourcesConfig map. Instead of removing the test-resources. prefix, like the client expects, it was passing the full property name which led to resolvers being unable to resolve properties.

While this commit fixes the problem at the source, in the properties factory, a sanity cleanup has been introduced in the controller, in order to cleanup such entries in case they show up. This could be useful if a program uses the client directly but forgets to do the same (in the "normal" use case, the properties are passed "naturally" without the prefix because that's how the config API works).

Fixes #663

(Note to the reviewer: this only concerns users of the test resources JUnit extensions)

This commit fixes the `TestResourcesPropertiesFactory`, which
incorrectly passed the `testResourcesConfig` map. Instead of
removing the `test-resources.` prefix, like the client expects,
it was passing the full property name which led to resolvers
being unable to resolve properties.

While this commit fixes the problem at the source, in the
properties factory, a sanity cleanup has been introduced
in the controller, in order to cleanup such entries in case
they show up. This could be useful if a program uses the
client directly but forgets to do the same (in the "normal"
use case, the properties are passed "naturally" without the
prefix because that's how the config API works).

Fixes #663
@melix melix added the type: bug Something isn't working label Jul 19, 2024
@melix melix added this to the 2.5.4 milestone Jul 19, 2024
@melix melix requested a review from alvarosanchez July 19, 2024 09:52
@melix melix self-assigned this Jul 19, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
50.0% Coverage on New Code (required ≥ 70%)

See analysis details on SonarCloud

@melix melix requested a review from graemerocher July 19, 2024 09:56
@melix melix merged commit 2a2edb0 into 2.5.x Jul 19, 2024
10 of 11 checks passed
@melix melix deleted the cc/issue-663 branch July 19, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants